package cn.gok.server.controller;

import cn.gok.common.config.SystemLog;
import cn.gok.common.entity.order.OrderMaster;
import cn.gok.common.resp.PageResult;
import cn.gok.server.service.OrderMasterService;
import cn.gok.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: DxlinY
 * @apiNote:
 * @date: 2020/11/6
 * @time: 14:59
 */
@RestController
@RequestMapping("/orderMaster")
public class OrderMasterController {

    @Autowired
    private OrderMasterService orderMasterService;

    /**
     * 订单主表分页
     *
     * @param page        分页
     * @param limit       页容量
     * @param orderMaster 分类查询
     * @return result
     */
    @PostMapping("/page")
    @SystemLog(model = "订单主表", method = "订单列表查询")
    public PageResult page(int page, int limit, OrderMaster orderMaster) {
        return ResultUtil.pageInfo(orderMasterService.listAll(page, limit, orderMaster));
    }


}
